package com.woniu.p2p.listener;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import com.woniu.p2p.excelservice.InCouponService;
import com.woniu.p2p.vo.ImportCouponVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @author 86152
 * @create 2020/8/15
 * @since 1.0.0
 */
@Component
public class CouponListener extends AnalysisEventListener<ImportCouponVo> {
    @Autowired
    InCouponService inCouponService;

    @Override
    public void invoke(ImportCouponVo importCouponVo, AnalysisContext analysisContext) {
        inCouponService.readExcel(importCouponVo);
    }

    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {

    }
}
